public class IsContinuous {
    public boolean IsContinuous (int[] numbers) {
        // write code here
        int[] hash = new int[14];
        for (int number : numbers) {
            if (++hash[number] == 2 && number != 0) {
                return false;
            }
        }
        for (int i = 0; i < 14; i++) {
            if (i != 0 && hash[i] != 0) {
                for (int j = 1; j < 5; j++) {
                    if (i + j > 13) {
                        return true;
                    }
                    if (hash[i+j] == 0) {
                        if (hash[0]-- == 0) {
                            return false;
                        }
                    }
                }
                return true;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        IsContinuous isContinuous = new IsContinuous();
        System.out.println(isContinuous.IsContinuous(new int[]{0,0,11,12,13}));
    }

}
